package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ShopOperationManualMapper;
import com.ruoyi.system.domain.ShopOperationManual;
import com.ruoyi.system.service.IShopOperationManualService;

/**
 * 操作指南Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-03
 */
@Service
public class ShopOperationManualServiceImpl implements IShopOperationManualService 
{
    @Autowired
    private ShopOperationManualMapper shopOperationManualMapper;

    /**
     * 查询操作指南
     * 
     * @param operationId 操作指南主键
     * @return 操作指南
     */
    @Override
    public ShopOperationManual selectShopOperationManualByOperationId(Long operationId)
    {
        return shopOperationManualMapper.selectShopOperationManualByOperationId(operationId);
    }

    /**
     * 查询操作指南列表
     * 
     * @param shopOperationManual 操作指南
     * @return 操作指南
     */
    @Override
    public List<ShopOperationManual> selectShopOperationManualList(ShopOperationManual shopOperationManual)
    {
        return shopOperationManualMapper.selectShopOperationManualList(shopOperationManual);
    }

    /**
     * 新增操作指南
     * 
     * @param shopOperationManual 操作指南
     * @return 结果
     */
    @Override
    public int insertShopOperationManual(ShopOperationManual shopOperationManual)
    {
        shopOperationManual.setCreateTime(DateUtils.getNowDate());
        return shopOperationManualMapper.insertShopOperationManual(shopOperationManual);
    }

    /**
     * 修改操作指南
     * 
     * @param shopOperationManual 操作指南
     * @return 结果
     */
    @Override
    public int updateShopOperationManual(ShopOperationManual shopOperationManual)
    {
        shopOperationManual.setUpdateTime(DateUtils.getNowDate());
        return shopOperationManualMapper.updateShopOperationManual(shopOperationManual);
    }

    /**
     * 批量删除操作指南
     * 
     * @param operationIds 需要删除的操作指南主键
     * @return 结果
     */
    @Override
    public int deleteShopOperationManualByOperationIds(Long[] operationIds)
    {
        return shopOperationManualMapper.deleteShopOperationManualByOperationIds(operationIds);
    }

    /**
     * 删除操作指南信息
     * 
     * @param operationId 操作指南主键
     * @return 结果
     */
    @Override
    public int deleteShopOperationManualByOperationId(Long operationId)
    {
        return shopOperationManualMapper.deleteShopOperationManualByOperationId(operationId);
    }
}
